import Flutter
import UIKit

public class SwiftVrPlugin: NSObject, FlutterPlugin {
  public static func register(with registrar: FlutterPluginRegistrar) {
    let channel = FlutterMethodChannel(name: "vr", binaryMessenger: registrar.messenger())
    let instance = SwiftVrPlugin()
    registrar.addMethodCallDelegate(instance, channel: channel)
  }

  public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
    result("iOS " + UIDevice.current.systemVersion)
  }
}

public class TestViewPlugin : NSObject, FlutterPlugin {
    public static func register(with registrar: FlutterPluginRegistrar) {
        TestViewFactory.register(withRegistrar: registrar)
    }
}

public class TestLabelPlugin : NSObject, FlutterPlugin {
    public static func register(with registrar: FlutterPluginRegistrar) {
        TestLabelFactory.register(withRegistrar: registrar)
    }
}

public class VRWebViewPlugin : NSObject, FlutterPlugin {
    public static func register(with registrar: FlutterPluginRegistrar) {
        VRWebViewFactory.register(withRegistrar: registrar)
    }
}

public class AnswerViewPlugin : NSObject, FlutterPlugin {
    public static func register(with registrar: FlutterPluginRegistrar) {
        AnswerViewFactory.register(withRegistrar: registrar)
    }
    public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
        switch call.method {
        case "joinRoom_success":
            break
        case "joinRoom_fail":
            break
        default:break
        }
    }
}
